
'use strict';

/**
	Part of Zombie Navigator
	Copyright © 2015  Zombie Navigator Developers
	
	@file
	@license AGPL-3.0+
*/


/*
	Zombie script example (= unprivileged)
	Do NOT require () this script from the addon code.
*/


const {zombie, console} = require('zombie/zombie');
const {openWindow, openPrivateWindow, closeAll} = require('zombie/webbrowser');
const {run, delay} = require('zombie/async');


run(function* () {
	let w = yield openWindow('invalid://authority/');
	console.log(w.uri);
	yield delay(2);
	
	w.uri = '//authority2/';
	yield w.waitForReload();
	console.log(w.uri);
	yield delay(2);
	
	w.uri = '/path/to/dir';
	yield w.waitForReload();
	console.log(w.uri);
	yield delay(2);
	
	w.uri = '../path2/';
	yield w.waitForReload();
	console.log(w.uri);
	yield delay(2);
	
	w.uri = '../../../../../././../.#foobar?';
	yield w.waitForReload();
	console.log(w.uri);
	yield delay(2);
	
	yield closeAll();
	console.log('closed');
});


// vim: ts=4 noet ai

